import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [{
            path: '/',
            redirect: {
                name: "index"
            }
        },
        {
            path: '/401',
            redirect: '/login'
        },
        {
            path: '/402',
            redirect: '/company_login'
        },
        {
            path: '/index',
            name: 'index',
            component: resolve => require(['@/view/index.vue'], resolve),
            title: "首页"
        },
        {
            path: '/login',
            name: 'login',
            component: resolve => require(['@/view/login.vue'], resolve),
            title: "登录"
        },
        {
            path: '/register',
            name: 'register',
            component: resolve => require(['@/view/register.vue'], resolve),
            title: "注册"
        },
        {
            path: '/forget_pwd',
            name: 'forget_pwd',
            component: resolve => require(['@/view/forget_pwd.vue'], resolve),
            title: "忘记密码"
        },
        {
            path: '/company_login',
            name: 'company_login',
            component: resolve => require(['@/view/company_login.vue'], resolve),
            title: "企业登录"
        },
        {
            path: '/company_register',
            name: 'company_register',
            component: resolve => require(['@/view/company_register.vue'], resolve),
            title: "企业注册"
        },
        {
            path: '/company_forget',
            name: 'company_forget',
            component: resolve => require(['@/view/company_forget.vue'], resolve),
            title: "企业忘记密码"
        },
        {
            path: '/user_info',
            name: 'user_info',
            component: resolve => require(['@/view/user/user_info.vue'], resolve),
            title: "个人中心"
        },
        {
            path: '/user/modify_pwd',
            name: 'modify_pwd',
            component: resolve => require(['@/view/user/modify_pwd.vue'], resolve),
            title: "修改密码"
        },
        {
            path: '/user/apply_info',
            name: 'apply_info',
            component: resolve => require(['@/view/user/apply_info.vue'], resolve),
            title: "报名信息"
        },
        {
            path: '/user/feedback',
            name: 'feedback',
            component: resolve => require(['@/view/user/feedback.vue'], resolve),
            title: "问题反馈"
        },
        {
            path: '/user/download',
            name: 'download',
            component: resolve => require(['@/view/user/download.vue'], resolve),
            title: "下载中心"
        },
        {
            path: '/user/business_center',
            name: 'business_center',
            component: resolve => require(['@/view/user/business_center.vue'], resolve),
            title: "业务中心"
        },
        {
            path: '/user/view_invoice/:tradeNo',
            name: 'view_invoice',
            component: resolve => require(['@/view/user/view_invoice.vue'], resolve),
            title: "查看发票"
        },
        {
            path: '/user/view_invoice/:kid/:tradeNo',
            name: 'view_invoice1',
            component: resolve => require(['@/view/user/view_invoice.vue'], resolve),
            title: "查看发票"
        },
        {
            path: '/user/view_certificate/:applyid',
            name: 'view_certificate',
            component: resolve => require(['@/view/user/view_certificate.vue'], resolve),
            title: "查看证书"
        },
        {
            path: '/user/my_certificate',
            name: 'my_certificate',
            component: resolve => require(['@/view/user/my_certificate.vue'], resolve),
            title: "我的证书"
        },
        {
            path: '/user/update_phone',
            name: 'update_phone',
            component: resolve => require(['@/view/user/update_phone.vue'], resolve),
            title: "修改手机号"
        },
        {
            path: '/apply/online_apply/:type',
            name: 'online_apply',
            component: resolve => require(['@/view/apply/online_apply.vue'], resolve),
            title: "在线报名"
        },
        {
            path: '/apply/yijian_apply/:type',
            name: 'online_apply',
            component: resolve => require(['@/view/apply/yijian_apply.vue'], resolve),
            title: "一级建造师"
        },
        {
            path: '/apply/slry_apply/:type',
            name: 'slry_apply',
            component: resolve => require(['@/view/apply/slry_apply.vue'], resolve),
            title: "三类人员在线报名"
        },
        {
            path: '/apply/confirm_order/:kid/:tradeNo',
            name: 'confirm_order',
            component: resolve => require(['@/view/apply/confirm_order.vue'], resolve),
            title: "确认订单"
        },
        {
            path: '/apply/apply_success/:tradeNo',
            name: 'apply_success',
            component: resolve => require(['@/view/apply/apply_success.vue'], resolve),
            title: "报名成功"
        },
        {
            path: '/apply/refund_success/:tradeNo',
            name: 'refund_success',
            component: resolve => require(['@/view/apply/refund_success.vue'], resolve),
            title: "退费成功"
        },
        {
            path: '/apply/zhifubao/:tradeNo',
            name: 'zhifubao',
            component: resolve => require(['@/view/apply/zhifubao.vue'], resolve),
            title: "支付宝"
        },
        {
            path: '/apply/flow_order/:tradeNo',
            name: 'flow_order',
            component: resolve => require(['@/view/apply/flow_order.vue'], resolve),
            title: "订单流水自动跳转"
        },
        {
            path: '/apply_special/web_education/:type',
            name: 'web_education',
            component: resolve => require(['@/view/apply_special/web_education.vue'], resolve),
            title: "特种作业持证人员继续教育网络报名"
        },
        {
            path: '/other/ti_prev/:applyId',
            name: 'ti_prev',
            component: resolve => require(['@/view/other/ti_prev.vue'], resolve),
            title: "体检预约"
        },
        {
            path: '/user/ticketManage',
            name: 'ticketManage',
            component: resolve => require(['@/view/user/ticketManage.vue'], resolve),
            title: "发票管理"
        },
        {
            path: '/other/class_card/:tradeNo',
            name: 'class_card',
            component: resolve => require(['@/view/other/class_card.vue'], resolve),
            title: "听课证信息"
        },
        {
            path: '/other/facejie_card/:tradeNo',
            name: 'facejie_card',
            component: resolve => require(['@/view/other/facejie_card.vue'], resolve),
            title: "面授结业证"
        },
        {
            path: '/other/invoice/:tradeNo',
            name: 'invoice',
            component: resolve => require(['@/view/other/invoice.vue'], resolve),
            title: "发票界面"
        },
        {
            path: '/news/news_center',
            name: 'news_center',
            redirect: '/news/news_1'
        },
        {
            path: '/news/news_:type',
            name: 'news_center',
            component: resolve => require(['@/view/news/news_center.vue'], resolve),
            title: "新闻中心"
        },
        {
            path: '/news/news_info/:id',
            name: 'news_info',
            component: resolve => require(['@/view/news/news_info.vue'], resolve),
            title: "新闻详情"
        },
        {
            path: '/certificate/person_certificate',
            name: 'person_certificate',
            component: resolve => require(['@/view/certificate/person_certificate.vue'], resolve),
            title: "个人查询"
        },
        {
            path: '/play/task/:id/:period',
            name: 'task',
            component: resolve => require(['@/view/play/task.vue'], resolve),
            title: "视频任务"
        },
        {
            path: '/play/:courseId/:applyId/:groupCode',
            name: 'video_ali',
            component: resolve => require(['@/view/play/video_ali.vue'], resolve),
        },
        {
            path: '/exam/:productId/:examId',
            name: 'exam',
            component: resolve => require(['@/view/play/exam.vue'], resolve),
            title: "考试"
        },
        {
            path: '/web404',
            name: 'web404',
            component: resolve => require(['@/view/web404.vue'], resolve),
            title: "页面404"
        },
        {
            path: '/phone404',
            name: 'phone404',
            component: resolve => require(['@/view/phone404.vue'], resolve),
            title: "页面404"
        },
        {
            path: '/realNameAuth/:page',
            name: 'real_name_auth',
            component: resolve => require(['@/view/user/real_name_auth.vue'], resolve),
            title: "实名认证"
        },
        {
            path: '*',
            component: resolve => require(['@/view/404.vue'], resolve),
        },
        {
            path: '/broswerPage',
            name: 'broswerPage',
            component: resolve => require(['@/view/play/broswerPage.vue'], resolve),
            title: "broswerPage"
        },
        {
            path: '/downloadTicket',
            name: 'downloadTicket',
            component: resolve => require(['@/view/other/downloadTicket.vue'], resolve),
            title: "下载准考证"
        },
        {
            path: '/declare',
            name: 'declare',
            component: resolve => require(['@/view/other/declare.vue'], resolve),
            title: "上传材料"
        },
        {
            path: '/declareList',
            name: 'declareList',
            component: resolve => require(['@/view/other/declareList.vue'], resolve),
            title: "审核通过列表"
        }
    ]
})
